package com.canyou.archives.model.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 设备分类新增编辑模型
 *
 * @author index
 * @date 2021/12/08 15:42
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "CategoryExportExcelDTO", description = "设备分类导出类")
public class CategoryExportExcelDTO implements Serializable{

    @Excel(name = "序号",orderNum = "1")
    @ApiModelProperty(value = "主键id")
    private Long id;

    @Excel(name = "创建人",orderNum = "3")
    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ExcelIgnore
    @ApiModelProperty(value = "修改人")
    private String modifyBy;

    @Excel(name = "创建时间",orderNum = "4",width = 20.0,format ="yyyy年MM月dd日")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ExcelIgnore
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime modifyTime;

    @ExcelIgnore
    @ApiModelProperty(value = "逻辑删除")
    private Integer isDeleted;

    @ExcelIgnore
    @ApiModelProperty(value = "乐观锁版本")
    private Long version;

    @Excel(name = "分类名称",orderNum = "2")
    @ApiModelProperty(value = "分类名称")
    @TableField("cname")
    private String cname;

    @Excel(name = "使用状态",orderNum = "5",replace = {"启用_1","未启用_0"})
    @ApiModelProperty(value = "使用状态：0未启用，1启用")
    private Integer state;

    @ExcelIgnore
    @ApiModelProperty(value = "排序")
    private Integer sort;

}
